1. Field of the Invention
The present invention relates to a method for determining the amount of encoded data that can be stored in a known memory space, that is, in a memory space having a known storage capacity, as well as to a method for controlling the size of encoded data.
2. Description of the Related Art
JPEG is a common method for encoding still images and is specified in ISO 10918-1 JPEG International Standard/ITU-T Recommendation T.81 (“Digital Compression Coding of Continuous-Tone Still Images”), which is incorporated by reference herein. This reference is hereinafter referred to as the “JPEG specification”. This standard is reproduced in Pennebaker and Mitchell, JPEG: Still Image Data Compression Standard, New York, Van Nostrand Reinhold, 1993, which is also incorporated by reference herein.
Most digital still cameras employ the so-called JPEG Baseline Coding technique, in which a still image is partitioned into 8×8 blocks, each of which is transformed into the frequency domain by DCT (Discrete Cosine Transform), quantized, and variable-length encoded using Huffman codes.
In a digital camera employing JPEG Baseline Coding, it is difficult to predict the remaining number of photographs that can be recorded in a given memory space due to the unpredictable file sizes of the image files derived from the photographs. Some cameras display a number that indicates a remaining number of images that can be recorded in a remaining memory space, and control the file sizes of subsequently obtained images, so that the displayed number of JPEG images can be stored in the remaining memory space. A well-known method for controlling the file size of a variable-length coded image is the iterative optimization of the quantization tables. A software implementation of this method is disclosed in Japanese laid open patent application No. H02-100487, whereas a purely hardware implementation of this method using multiple bit-counting sections is disclosed in U.S. Pat. No. 5,146,324. Both the software and hardware implementations require extensive processing time and consume excessive battery power.
It has also been suggested to calculate and display the remaining number of photographs that can be obtained with a digital still camera based upon statistical models of the file size variation as described in US2001/0000969A1 or in Japanese laid open patent application No. H05-110789. These methods rely on the average file size and its statistical variation only, and thus are not considerably reliable.